﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Location.aspx.cs" Inherits="LabMS.Web.Equipment.common.Location" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>库存位置</title>
   <link type="text/css" rel="stylesheet" href="../../style/screen.css" />
    <script src="../../js/Common.js" type="text/javascript"></script> 
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../style/ie7.css" />
    <![endif]-->

    <script type="text/javascript" language="javascript">
        //重置
        function ReSet()
        {
            document.getElementById("LocationNameTBX").value="";
            document.getElementById("CampusTBX").value="";
            document.getElementById("BuildingNameTBX").value="";
            document.getElementById("FloorTBX").value="";
            document.getElementById("RoomNumTBX").value="";
        }
        //全选
        function check() 
        { 
          var flag=document.getElementById('LabRoomGridView_ctl01_AllSelectCB').checked;
          var gvshow=document.getElementById('LabRoomGridView');
          var count=gvshow.rows.length;
          
          for(var i=1;i<count;i++)
          {  
            gvshow.rows[i].getElementsByTagName("input")[0].checked = flag;
          }
        }

        function DbClickEvent(a,b)
        {
             //window.alert("事件类型:DoubleClick作用对象:"+a+b);
              var ret = new Array(2); 
              ret[0] = a; 
              ret[1] = b; 
              window.returnValue = ret; 
              window.close();
              return false; 
        }  
    </script> 
</head>
<body>
    <form id="form1" runat="server">
     <div class="main">
            <div id="pageInfo" class="clearfix">
                <div class="title">
                    <label>
                        实验用房信息</label>
                </div>
            </div>
        </div>
        <div style="padding: 5px;" class="main">
            <table cellpadding="4" cellspacing="0" border="0">
                <tr>
                    <td>
                        隶属实验室：
                    </td>
                    <td>
                        <asp:DropDownList ID="LabDDL" runat="server" DataTextField="Lab_Name" DataValueField="ID"
                            OnSelectedIndexChanged="DropDownListIndex_OnChanged" AutoPostBack="true">
                        </asp:DropDownList>
                    </td>
                    <td>
                        名称:
                    </td>
                    <td>
                        <asp:TextBox ID="LocationNameTBX" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        校区:
                    </td>
                    <td>
                        <asp:TextBox ID="CampusTBX" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        楼名称:
                    </td>
                    <td>
                        <asp:TextBox ID="BuildingNameTBX" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        楼层:
                    </td>
                    <td>
                        <asp:TextBox ID="FloorTBX" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        房间号:
                    </td>
                    <td>
                        <asp:TextBox ID="RoomNumTBX" runat="server"></asp:TextBox>
                    </td>
                </tr>
            </table>
            <p>
                <asp:Button ID="SearchBtn" runat="server" CssClass="button" Text="搜索" OnClick="Search_OnClick" />
                <input id="button2" onclick="ReSet()" type="button" class="button" name="button2"
                    value="重置" />
            </p>
            </div>
            <div class="main">
            <asp:GridView ID="LabRoomGridView" CssClass="infoTable" AllowPaging="true" PageSize="10"
                runat="server" DataKeyNames="ID" AutoGenerateColumns="false" OnRowDataBound="LabRoomGridView_RowDataBound"
                OnPageIndexChanging="LabRoomGridView_PageIndexChanging" Width="100%">
                <Columns>
                    <asp:BoundField DataField="ID" Visible="false" />
                    <asp:BoundField DataField="Location_Name" HeaderText="名称" ShowHeader="true" />
                    <asp:BoundField DataField="Location_Campus" HeaderText="校区" ShowHeader="true" />
                    <asp:BoundField DataField="Location_Building" HeaderText="楼名称" ShowHeader="true" />
                    <asp:BoundField DataField="Location_Floor" HeaderText="楼层" ShowHeader="true" />
                    <asp:BoundField DataField="Location_RoomNum" HeaderText="房间号" ShowHeader="true" />
                    <asp:BoundField DataField="Location_Area" HeaderText="面积(㎡)" ShowHeader="true" />
                    <asp:BoundField DataField="Location_InCharge" HeaderText="负责人" ShowHeader="true" />
                    <asp:BoundField DataField="Location_Phone" HeaderText="联系电话" ShowHeader="true" />
                    <asp:BoundField DataField="Lab_Name" HeaderText="隶属实验室" ShowHeader="true" />
                </Columns>
                <EmptyDataTemplate>
                    无任何用房信息
                </EmptyDataTemplate>
                <HeaderStyle CssClass="header" />
                <PagerSettings FirstPageText="首页" LastPageText="最后页" NextPageText="后一页" PreviousPageText="前一页"
                    Mode="NextPreviousFirstLast" />
            </asp:GridView>
        </div>
        <script type="text/javascript" src="../../js/jQuery/jquery-1.3.1.js"></script>

    <script type="text/javascript">

        $(function(){
            /* 修改样式 */
            $("#LabRoomGridView > tbody > tr:even").not(":first").addClass("even");
            $("#LabRoomGridView > tbody > tr").not(":first")
                .hover(
                    function(){
                        $(this).addClass("hover");
                    },
                    function(){
                        $(this).removeClass("hover");
                });
        });
    </script>
    </form>
</body>
</html>
